This invention pertains generally to methods and systems for communication of audio signals between a circuit-switched telephone network and a packet-switched data network, and more particularly to methods and systems for compressing and decompressing multiple audio data streams for packet-switched transmission.
Traditional telephone networks are circuit-switched. A circuit-switched network establishes a continuously transmitting connection between persons at both ends Qf a phone conversation. This type of connection generally requires that one network circuit be dedicated to each conversation for its entire duration. The network circuit typically comprises an analog phone wire, a time slot on a time-division-multiplexed (TDM) digital wire, satellite, or microwave transmission, or some combination of these technologies. Although during the course of a telephone conversation it is possible for a connection to be re-routed, generally some network path between connection endpoints remains open throughout.
In contrast, most data networks are packet-switched. A packet-switched network communicates data in small chunks, or xe2x80x9cpacketsxe2x80x9d, which require no dedicated circuit. Each packet contains an address that allows the data network to route it to the appropriate destination. Packets travel across a network much as cars travel on a highway systemxe2x80x94each packet must merge with and share the road with competing traffic. Packet switches operate like highway interchanges, allowing packets orderly network ingress and egress.
It is now possible to route voice telephone traffic over data networks through a technique commonly referred to as xe2x80x9cVoice Over IPxe2x80x9d, or xe2x80x9cVoIPxe2x80x9d for short. VoIP can require significantly less average bandwidth than a traditional circuit-switched connection for several reasons. First, by detecting when voice activity is present, VoIP can choose to send little or no data when a speaker on one end of a conversation is silent, whereas a circuit-switched connection continues to transmit during periods of silence. Second, the digital audio bitstream utilized by VoIP may be significantly compressed before transmission using a codec (compression/decompression) scheme. Using current technology, a telephone conversation that would require two 64 kbps (one each way) channels over a circuit-switched network may utilize a data rate of roughly 8 kbps with VoIP.
One limitation of VoIP is the requirement that both ends of the conversation be connected to the same packet-switched network. Two computer users running compatible software can establish voice communications if both of their computers are connected to the common packet-switched network (using IP, IPX, or another protocol) and one user knows how to reach the other. VoIP becomes much more attractive if both users need not sit at a computer, such that one or both parties to the conversation can use conventional phones. Hardware that allows conventional phones to communicate over the Internet (or an intranet) is known as an Internet telephony gateway.
Several Internet telephony gateways 20, 34, 36 are illustrated in FIG. 1. One side of such a gateway typically connects to a circuit-switched public telephone network 22, 38 or a private branch exchange 44. A gateway may be reached by dialing an appropriate phone number from any phone (e.g. 26, 28, 40, 42, 46) connected to 22, 38, or 44. The other side of an Internet telephony gateway connects to a packet-switched data network 24, which may be the Internet, an intranet, or a proprietary data network. Gateway 20 may conduct a VoIP session with a computer (e.g. 30, 32) running VoIP software and connected to data network 24, or with another gateway 34, 36.
Gateway 20 typically performs several functions. It may process fax or modem transmissions as well as voice data, or it may be dedicated to processing voice data only. For processing voice data, the gateway performs voice activity detection (VAD) on the audio signal it receives from phone network 22. Gateway 20 may perform echo cancellation on this signal. The gateway typically utilizes a codec to compress the incoming signal from phone network 22. The compressed signal is packetized and routed by gateway 20 for delivery over packet-switched network 24. For the audio packets received from packet-switched network 24, the gateway assembles the audio packets into a data stream, decompresses the data stream, and outputs the decompressed data stream onto phone network 22. Gateways also typically perform connection establishment, administrative, and statistics-gathering functions.
Most Internet telephony gateways offer the capability to handle multiple simultaneous connections to a circuit-switched phone network. Gateway providers have a significant interest in providing effective compression of audio signals from each circuit-switched connection in order to reduce the bandwidth requirements of their packet-based network connection. Unfortunately, codecs are computationally intensive, and require a tradeoff between gateway-supplied processing power and compression capability.
The present invention provides a gateway system that effectively manages this tradeoff. The system provides high quality but computationally intensive voice compression for each connection when the system is lightly loaded. At times when the system is heavily utilized, lower-quality, less computationally intensive compression is employed. However, the system preferably operates so as to provide high-quality compression to as many connections as possible at any given time. The system can thus offer both high voice quality and high port density with modest processing resources, by allowing selective degradation of voice quality on some ports during periods of heavy utilization.
One key feature of the present invention is the ability of a gateway to switch codecs mid-conversation for a given connection, without requiring the data network destination to re-initialize, renegotiate, acknowledge, or even know that the codec has been switched. This feature provides an instant compatibility advantagexe2x80x94the packet receiver need only recognize one compressed data format that is compatible with both a high-quality and a low-quality codec. This requires that the high-quality and lower-quality codecs provide interoperability, at least to the extent that both produce compressed data that is compatible with a common decompression process.
In accordance with the present invention, a packet-based network telephony gateway is disclosed. This gateway comprises a port capable of allowing communication between the gateway and a plurality of telephone circuits. This gateway also comprises a codec processing resource capable of performing real-time data compression on audio streams received from the telephone circuits, using a codec selected from a set of codecs.
The codec processing resource preferably provides only enough processing throughput to allow the first codec to be used with a subset of the telephone circuits that can be connected through the port. The first codec and at least one alternate codec produce interoperably decompressable data streams.
The gateway further comprises a host processing resource that monitors telephone traffic density passing through the gateway and signals the codec processing resource to shift selected audio streams between codecs in the codec set that produce interoperably decompressable data streams; preferably, codec shifting is done to provide the best audio quality possible for the current traffic density.
In accordance with the present invention, a method of operating a packet-based network telephony gateway is disclosed that simultaneously handles a plurality of voice calls. This method monitors the number of calls presently being handled by the gateway. As calls are added or dropped from the gateway, a codec is dynamically selected, from a set of interoperably decompressable codecs, for each current call. Preferably, a first codec from this set, one that least degrades audio quality, is selected for each call when call density is low. Selected calls are switched to a second codec from the set of codecs when call density will not allow all calls to be processed using the first codec. Preferably, calls may be switched back to the first codec as processing resources allow. Some selection criteria for choosing which calls are switched to an alternate codec include length of call, quality of service, the number of times each call has previously switched codecs, or presence of voice activity.